package cn.edu.java.object;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Person implements Say, Serializable {
    String name;
    int age;

    public void say() {
        System.out.println("hello, i am a person.");
        System.out.println(this);
    }

    private String say(int i) {
        return "say:" + i;
    }


    public static void main(String[] args) {
        Person person = new Person();
        System.out.println(person.say(5));
    }
}
